<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>订单列表</title>
	<link href="../../css/admin/common.css" type="text/css" rel="stylesheet">
	<style type="text/css">
		table{
			text-align: center;
			border-collapse: collapse
		}
	</style>
	<script type="text/javascript">
		function changeColor(obj){
			obj.className="bgcolor";
		}
		function changeColor1(obj){
			obj.className="";
		}
	</script>
</head>
<body>
	<br>
	<table border="1" bordercolor="#ccc">
		<tr>
			<th width="150px">订单编号</th>
			<th width="150px">用户E-mail</th>
			<th width="100px">订单金额</th>
			<th width="100px">订单状态</th>
			<th width="150px">订单日期</th>
			<th width="100px">操作</th>
		</tr>
		<c:forEach items="${orders}" var="order">
            <tr onmousemove="changeColor(this)" onmouseout="changeColor1(this)">
                <td>${order.id}</td>
                <td>${order.email}</td>
                <td>${order.money}</td>
                <c:if test="${order.status==0}">
                    <td>未付款</td>
                </c:if>
                <c:if test="${order.status==1}">
                    <td>已付款</td>
                </c:if>
                <td>${order.formattedDate}</td>
                <td>
                    <a style="color: red" href="/management/order/remove?id=${order.id}">删除</a>
                </td>
            </tr>
        </c:forEach>
	</table>
</body>
</html>
